package com.combetter.changxing.db.entity;

import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;

/**
 * 吸烟记录bean
 * <p>
 * 作者: Chen
 * 日期: 2018/10/29 17:27
 */
@Entity(tableName = "record_table")//已收藏
public class Record {

    /**
     * smid : 10.0
     * codes : 6901028942898
     * goodsName : 双喜(硬精品好日子)小盒
     * smokecount : 210.0
     */
    @PrimaryKey(autoGenerate = true)
    private int id;
    @ColumnInfo(name = "_smid") //
    private double smid;
    @ColumnInfo(name = "_codes") //
    private String codes;
    @ColumnInfo(name = "_goodsName") //
    private String goodsName;
    @ColumnInfo(name = "_smokecount") //
    private String smokecount;
    @ColumnInfo(name = "_trademark") //
    private String trademark;
    @ColumnInfo(name = "_uid") //
    private String uid;

    public double getSmid() {
        return smid;
    }

    public void setSmid(double smid) {
        this.smid = smid;
    }

    public String getCodes() {
        return codes;
    }

    public void setCodes(String codes) {
        this.codes = codes;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getGoodsName() {
        String model2 = goodsName;
        int position = goodsName.indexOf("_");
        if (position != -1) {
            model2 = goodsName.substring(position + 1, goodsName.length());
        }
        return model2;

    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getSmokecount() {
        return smokecount;
    }

    public void setSmokecount(String smokecount) {
        this.smokecount = smokecount;
    }

    public String getTrademark() {
        String brand2 = trademark;
        int position = trademark.indexOf("_");
        if (position != -1) {
            brand2 = trademark.substring(0, position);
        }
        return brand2;
    }

    public void setTrademark(String trademark) {
        this.trademark = trademark;
    }
}
